package com.hzw.saas.common.config.util;

import com.baomidou.mybatisplus.core.conditions.interfaces.Join;
import lombok.experimental.UtilityClass;

/**
 * mybatis plus 增强工具
 *
 * @author zzl
 * @since 07/02/2021
 */
@UtilityClass
public class MybatisPlusUtil {

    /**
     * sql in 参数最大个数
     */
    public static final int MAX_IN_PARAMS = 1000;

    public static final String LIMIT_1 = "LIMIT 1";


    public <T> void limitOne(Join<T> join) {
        join.last(LIMIT_1);
    }

}
